#include <stdio.h>
#include <string.h>
#include "server.h"
#include "client.h"
#include"debug_print.h"


int main(int argc,char **argv)
{
    if (argc < 2)
    {
    	server();
		return 0;
        DEBUG_PRINT("usage: NetWork <server> or NetWork <client> <ipaddress> <port>\r\n");
        return -1;
    }
    if(strcmp(argv[1] , "server") == 0)
    {
        return server();
    }
	if(strcmp(argv[1] , "client") == 0)
    {
        if(argc != 4)
        {
			DEBUG_PRINT("usage: NetWork <server> or NetWork <client> <ipaddress> <port>\r\n");
        	return -1;
		}
		return client(argv[2], atoi(argv[3]));
    }

	return 0;
}
